<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>人员设置审核 人员设置审核</title>
<link href="${rc.contextPath}/common/css/common/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/jquery.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/thickbox/thickbox.js"></script>
<link rel="stylesheet" href="${rc.contextPath}/common/js/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css"/>
<script type="text/javascript" src="${rc.contextPath}/common/js/zTree/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/zTree/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/zTree/js/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/zTree/js/jquery.ztree.exedit-3.5.js"></script>
<style type="text/css">
	.emp{border:solid 1px gray; width:700px; height:300px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
	.emp .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
	#greyBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}
	
	.deptTree{border:solid 1px gray; width:700px; height:900px;display:none; z-index:101;position:absolute; background-color:#FFFFFF;}
	.deptTree .title{width:100%;height:20px;line-height:50px; border-top:solid 1px red;background-color:#b60613;top:0px;}
	#deptTreeBackGround{background:#000000;width:100%; display:none; z-index:100; top:0px; left:0px; position:absolute;}
</style>
<script type="text/javascript" src="${rc.contextPath}/common/js/main.js"></script>
<script type="text/javascript" src="${rc.contextPath}/common/js/ruleSet/approval/employeeSetApproval.js"></script>
<script type="text/javascript">
	var zNodes=$deptJson;
</script>
</head>
<body>
<div class="main">
  <div class="position">
	   <div class="p_left">当前位置：规则设定> 审核  > 人员设置审核</div>
	   <div class="p_right">
	    <dl><dt>姓名：</dt><dd>${currentUser.ename}</dd></dl>
	    <dl><dt>登录时间：</dt><dd><span id="nowDate"></span></dd></dl>
	  </div>
  </div>
  <!--可拖动 上部分-->
  <div class="topBox">
    <div class="mesCheck">
      <div class="title1"><strong>人员设置审核</strong></div>
      <div class="box2C">
    <!-- 查询 -->
    #if($shiro.hasPermission("员工条件查询"))
	<div style="padding-left: 10px;"  class="tableForm tab1"><br/>
	<form id="queryForm" action="${rc.contextPath}/ruleSet/approval/employeeSetApproval/getEmpList" method="post">
		<input id="pageNow" name="pageNow" type="hidden" />
	
		员工姓名：
		#if($ename)
			<input id="empName" name="ename" value="$ename"/>
		#else
			<input id="empName" name="ename" value="" maxlength="20"/>
		#end
		
	  	联系方式：
	  	#if($contact)
			<input id="contact" name="contact" value="$contact"/>
		#else
			<input id="contact" name="contact" value=""/>
		#end
	 	电子邮件：
	 	#if($contact)
			<input id="mail" name="mail" value="$mail"/>
		#else
			<input id="mail" name="mail" value=""/>
		#end
	 	角色：
	 	#if($roleId)
		<select id="roleId" name="roleId" style="width: 130px;">
			<option value="">---请选择---</option>
			#foreach( $role in $roleList)  
				#if($roleId==$role.id)
					<option selected="selected" value="$role.id">$role.name</option>
				#else
					<option value="$role.id">$role.name</option>
				#end
			#end
		</select>
		#else
		<select id="roleId" name="roleId" style="width: 130px;">
	  		<option value="">---请选择---</option>
			#foreach( $role in $roleList)  
			<option value="$role.id">$role.name</option>
			#end
		</select>
		#end
	 	

	 	所属部门：
	 	<input id="queryDeptId" name="deptId" type="hidden" value="$!dept.id"/>
     	<input id="queryTempDeptId" value="$!dept.dname"  readonly="readonly"/>
	 	<a href="javaScript:queryDeptTree();"><img src="${rc.contextPath}/common/images/search.jpg" alt="" width="15px;" height="15px;" /></a>
<!-- 	 	#if($deptId)
	 	<select id="deptId" name="deptId" style="width: 130px;">
	  		<option value="">---请选择---</option>
			#foreach( $dept in $deptList)  
				#if($deptId==$dept.id)
					<option selected="selected" value="$dept.id">$dept.dname</option>
				#else
					<option value="$dept.id">$dept.dname</option>
				#end
			#end
		</select>
	 	#else
	 	<select id="deptId" name="deptId" style="width: 130px;">
	  		<option value="">---请选择---</option>
			#foreach( $dept in $deptList)  
			<option value="$dept.id">$dept.dname</option>
			#end
		</select>
	 	#end -->
		<input id="queryEmp" type="button" value="查询"/>&nbsp; &nbsp; 
		<input id="clean" type="button" value="清空"/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp;  &nbsp; &nbsp;     
		</form>
		<div><strong>员工列表</strong></div>
	</div>
	#end
	<form id="approvalForm" action="${rc.contextPath}/ruleSet/approval/employeeSetApproval/approval" method="post">
		<input id="empno" name="empno" type="hidden" />
		<input id="empnoStr" name="empnoStr" type="hidden" />
		<input id="approvalStatus" name="approvalStatus" type="hidden" />
	</form>
	<!-- 列表 -->
	<div>
		<table class="tab2" cellpadding="0" align="center" width="100%">
		  	<tr align="center" >
		  		<th width="5%"><input id="selectAll" onchange="selectAll()" type="checkbox"></input></th>
		  		<th width="">员工姓名</th>
		  		<th width="">联系方式</th>
		  		<th width="" >电子邮件</th>
		  		<th width="" >所属部门</th>
		  		<th width="" >角色</th>
		  		<th width="" >报备库容量</th>
		  		<th width="" >人工推送上限</th>
		  		<th width="" >人工推送下限</th>
		  		<th width="" >是否接收系统推送</th>
		  		<th width="" >是否接收人工推送</th>
		  		<th width="" >是否可接客户</th>
		  		<th width="10%">操作</th>
		  	</tr>
	  		#foreach( $emp in $pageView.records)
	  		#if($emp.approvalStatus)
				#if($emp.approvalStatus==2)
	  		
		  	<tr align="center" >
		  		<td>
		  			<input id="empId_$emp.empno" type="checkbox" value="$emp.empno" />
		  		</td>
		  		<td>$emp.ename</td>
		  		<td>1234511</td>
		  		<td>123@sina.cn</td>
		  		<td>#if($emp.dname)$!emp.dname#end</td>
		  		<td>#if($emp.roleName)$!emp.roleName#end</td>
		  		<td>#if($emp.repcustomerCountApproval)$!emp.repcustomerCountApproval#end</td>
		  		<td>#if($emp.customerLimitApproval)$!emp.customerLimitApproval#end</td>
		  		<td>#if($emp.customerLowerLimitApproval)$!emp.customerLowerLimitApproval#end</td>
		  		<td>#if($emp.isSysPushApproval)
		  				#if($emp.isSysPushApproval==1)是#else否#end 
		  			#else否#end
		  		</td>
		  		<td>#if($emp.isArtificialPushApproval)
		  				#if($emp.isArtificialPushApproval==1)是#else否#end 
		  			#else否#end 
		  		</td>
		  		<td>#if($emp.receiveCustomApproval)
		  				#if($emp.receiveCustomApproval==1)是#else否#end 
		  			#else否#end 
		  		</td>		
		  		<td align="center">
		  		#if($shiro.hasPermission("员工角色修改"))#end
		  		<a onclick="approval('$emp.empno','1');"  href="#">通过</a>
		  		<a onclick="approval('$emp.empno','3');" href="#">拒绝</a>
		  		</td>
		    </tr>
		    #end
		    #end
	    	#end
		</table><br/>
		#if($shiro.hasPermission("批量角色修改"))#end
		#if($emp.approvalStatus)
			#if($emp.approvalStatus==2)
			#end
		#end
				<input onclick="bathApproval('1');" type="button" value="批量通过" style="margin-left: 20px;" />
				<input onclick="bathApproval('3');" type="button" value="批量拒绝" style="margin-left: 20px;" /><br/>


	</div>
	<!-- #BeginLibraryItem "/Library/page.lbi" -->
  	#set($pageNow=$pageView.pageNow)
	#set($pageNext=$pageView.pageNow+1)
	#if($pageView.pageNow==1)
		 #set($pageBack=$pageView.pageNow)
	#else
		 #set($pageBack=$pageView.pageNow - 1)
	#end
    #set($startRecord=($pageNow*$pageView.pageSize)-$pageView.pageSize+1)
    #set($endRecord=($pageNow*$pageView.pageSize))
    <input type="hidden" value="${pageView.pageCount}" id="pageCount"/>
    <div class="page clearfix">
      <ul class="le">
	        <li>显示<span>${startRecord}-${endRecord}</span>条</li>
	        <li>共<span>${pageView.rowCount}</span>条</li>
	        <li>第&nbsp;<span>${pageView.pageNow}</span>&nbsp;页</li>
      </ul>
      <ul class="ri">
        <li><a href="javascript:;configPageController('jump')" class="go">&nbsp;</a></li>
        <li>到
          <input type="text" class="input" id="pageJump" size="4" />
          页</li>
        <li><a href="javascript:;configPageController('${pageView.pageCount}')" class="btn">[末页]</a></li>
        <li><a href="javascript:;configPageController('${pageNext}')" class="btn">[下页]</a></li>
        <li><a href="javascript:;configPageController('${pageBack}')" class="btn">[前页]</a></li>
        <li><a href="javascript:;configPageController('1')" class="btn">[首页]</a></li>
      </ul>
    </div>
    <!-- #EndLibraryItem -->
	      		 
	<script>
	//分页
	function configPageController(value) {
		var pageCount=$("#pageCount").val();
		if(value<1){
			value=1;
		}
		if(value=="jump"){
			value=$("#pageJump").val();
		}
		if(parseInt(value)>parseInt(pageCount)){
			value=pageCount;
		}
		if(!$isQuery){
			window.location="${rc.contextPath}//ruleSet/approval/employeeSetApproval/employeeSetApprovalPage?pageNow="+value;
		}else{
			$("#pageNow")[0].value=value;
			$("#queryForm").submit();
		}	
	}
	</script>
	<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
</div>
</div>
</div>

	<div id="deptTree" class="deptTree" style="width: 800px;height: 400px;">
		<div class="title"></div><br/>
		<div style="margin-left: 20px;">选择部门
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<input id="deptTreeBtnCancel" type="button"  value="取消" style="float: right;margin-right: 10px;"/>
			<input id="queryDeptTreeBtnConfirm" type="button"  value="确定" style="float: right;margin-right: 10px;" />&nbsp;&nbsp;
		</div>
		<div style="margin-left: 20px;overflow-x: auto; overflow-y: auto;float: left;" class="zTreeDemoBackground left" >
			<ul id="treeDemo" class="ztree" style="width: 650px;height: 250px;"></ul>
		</div>
	</div>
</div>
</body>
</html>
